id/email
password
forgot password | create account
about | help | prefs
ReadingBatcode reading practice

 

 

Athenian: Booleansboolean2

prev  |  next  |  chance

Evaluate the overengineered XOR gate. By Benji '24

def XOR(bool1, bool2):
    value1 = bool1 or bool2
    value2 = not (bool1 and bool2)
    return value1 and value2
Function Call  Return Value
XOR(False, False)
XOR(False, True)
XOR(True, False)
XOR(True, True)

Experiment with this code on Gitpod.io

⬅ Back